Optimal. Leaf size=171 \[ -\frac{(7 A-11 B) \tan ^{-1}\left (\frac{\sqrt{a} \tan (c+d x)}{\sqrt{2} \sqrt{a \sec (c+d x)+a}}\right )}{2 \sqrt{2} a^{3/2} d}-\frac{(3 A-7 B) \tan (c+d x) \sqrt{a \sec (c+d x)+a}}{6 a^2 d}+\frac{(A-B) \tan (c+d x) \sec ^2(c+d x)}{2 d (a \sec (c+d x)+a)^{3/2}}+\frac{(9 A-13 B) \tan (c+d x)}{3 a d \sqrt{a \sec (c+d x)+a}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.461061, antiderivative size = 171, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 33, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.152, Rules used = {4019, 4010, 4001, 3795, 203} \[ -\frac{(7 A-11 B) \tan ^{-1}\left (\frac{\sqrt{a} \tan (c+d x)}{\sqrt{2} \sqrt{a \sec (c+d x)+a}}\right )}{2 \sqrt{2} a^{3/2} d}-\frac{(3 A-7 B) \tan (c+d x) \sqrt{a \sec (c+d x)+a}}{6 a^2 d}+\frac{(A-B) \tan (c+d x) \sec ^2(c+d x)}{2 d (a \sec (c+d x)+a)^{3/2}}+\frac{(9 A-13 B) \tan (c+d x)}{3 a d \sqrt{a \sec (c+d x)+a}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4019
Rule 4010
Rule 4001
Rule 3795
Rule 203
Rubi steps
\begin{align*} \int \frac{\sec ^3(c+d x) (A+B \sec (c+d x))}{(a+a \sec (c+d x))^{3/2}} \, dx &=\frac{(A-B) \sec ^2(c+d x) \tan (c+d x)}{2 d (a+a \sec (c+d x))^{3/2}}+\frac{\int \frac{\sec ^2(c+d x) \left (2 a (A-B)-\frac{1}{2} a (3 A-7 B) \sec (c+d x)\right )}{\sqrt{a+a \sec (c+d x)}} \, dx}{2 a^2}\\ &=\frac{(A-B) \sec ^2(c+d x) \tan (c+d x)}{2 d (a+a \sec (c+d x))^{3/2}}-\frac{(3 A-7 B) \sqrt{a+a \sec (c+d x)} \tan (c+d x)}{6 a^2 d}+\frac{\int \frac{\sec (c+d x) \left (-\frac{1}{4} a^2 (3 A-7 B)+\frac{1}{2} a^2 (9 A-13 B) \sec (c+d x)\right )}{\sqrt{a+a \sec (c+d x)}} \, dx}{3 a^3}\\ &=\frac{(A-B) \sec ^2(c+d x) \tan (c+d x)}{2 d (a+a \sec (c+d x))^{3/2}}+\frac{(9 A-13 B) \tan (c+d x)}{3 a d \sqrt{a+a \sec (c+d x)}}-\frac{(3 A-7 B) \sqrt{a+a \sec (c+d x)} \tan (c+d x)}{6 a^2 d}-\frac{(7 A-11 B) \int \frac{\sec (c+d x)}{\sqrt{a+a \sec (c+d x)}} \, dx}{4 a}\\ &=\frac{(A-B) \sec ^2(c+d x) \tan (c+d x)}{2 d (a+a \sec (c+d x))^{3/2}}+\frac{(9 A-13 B) \tan (c+d x)}{3 a d \sqrt{a+a \sec (c+d x)}}-\frac{(3 A-7 B) \sqrt{a+a \sec (c+d x)} \tan (c+d x)}{6 a^2 d}+\frac{(7 A-11 B) \operatorname{Subst}\left (\int \frac{1}{2 a+x^2} \, dx,x,-\frac{a \tan (c+d x)}{\sqrt{a+a \sec (c+d x)}}\right )}{2 a d}\\ &=-\frac{(7 A-11 B) \tan ^{-1}\left (\frac{\sqrt{a} \tan (c+d x)}{\sqrt{2} \sqrt{a+a \sec (c+d x)}}\right )}{2 \sqrt{2} a^{3/2} d}+\frac{(A-B) \sec ^2(c+d x) \tan (c+d x)}{2 d (a+a \sec (c+d x))^{3/2}}+\frac{(9 A-13 B) \tan (c+d x)}{3 a d \sqrt{a+a \sec (c+d x)}}-\frac{(3 A-7 B) \sqrt{a+a \sec (c+d x)} \tan (c+d x)}{6 a^2 d}\\ \end{align*}
Mathematica [A] time = 1.36585, size = 141, normalized size = 0.82 \[ \frac{\tan (c+d x) \left (\sqrt{1-\sec (c+d x)} \left (12 (A-B) \sec (c+d x)+15 A+4 B \sec ^2(c+d x)-19 B\right )-3 \sqrt{2} (7 A-11 B) \cos ^2\left (\frac{1}{2} (c+d x)\right ) \sec (c+d x) \tanh ^{-1}\left (\frac{\sqrt{1-\sec (c+d x)}}{\sqrt{2}}\right )\right )}{6 d \sqrt{1-\sec (c+d x)} (a (\sec (c+d x)+1))^{3/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.26, size = 603, normalized size = 3.5 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.591592, size = 1189, normalized size = 6.95 \begin{align*} \left [\frac{3 \, \sqrt{2}{\left ({\left (7 \, A - 11 \, B\right )} \cos \left (d x + c\right )^{3} + 2 \,{\left (7 \, A - 11 \, B\right )} \cos \left (d x + c\right )^{2} +{\left (7 \, A - 11 \, B\right )} \cos \left (d x + c\right )\right )} \sqrt{-a} \log \left (\frac{2 \, \sqrt{2} \sqrt{-a} \sqrt{\frac{a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + 3 \, a \cos \left (d x + c\right )^{2} + 2 \, a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right ) + 4 \,{\left ({\left (15 \, A - 19 \, B\right )} \cos \left (d x + c\right )^{2} + 12 \,{\left (A - B\right )} \cos \left (d x + c\right ) + 4 \, B\right )} \sqrt{\frac{a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{24 \,{\left (a^{2} d \cos \left (d x + c\right )^{3} + 2 \, a^{2} d \cos \left (d x + c\right )^{2} + a^{2} d \cos \left (d x + c\right )\right )}}, \frac{3 \, \sqrt{2}{\left ({\left (7 \, A - 11 \, B\right )} \cos \left (d x + c\right )^{3} + 2 \,{\left (7 \, A - 11 \, B\right )} \cos \left (d x + c\right )^{2} +{\left (7 \, A - 11 \, B\right )} \cos \left (d x + c\right )\right )} \sqrt{a} \arctan \left (\frac{\sqrt{2} \sqrt{\frac{a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt{a} \sin \left (d x + c\right )}\right ) + 2 \,{\left ({\left (15 \, A - 19 \, B\right )} \cos \left (d x + c\right )^{2} + 12 \,{\left (A - B\right )} \cos \left (d x + c\right ) + 4 \, B\right )} \sqrt{\frac{a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{12 \,{\left (a^{2} d \cos \left (d x + c\right )^{3} + 2 \, a^{2} d \cos \left (d x + c\right )^{2} + a^{2} d \cos \left (d x + c\right )\right )}}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (A + B \sec{\left (c + d x \right )}\right ) \sec ^{3}{\left (c + d x \right )}}{\left (a \left (\sec{\left (c + d x \right )} + 1\right )\right )^{\frac{3}{2}}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 9.4651, size = 400, normalized size = 2.34 \begin{align*} \frac{\frac{{\left ({\left (\frac{3 \,{\left (\sqrt{2} A a \mathrm{sgn}\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 1\right ) - \sqrt{2} B a \mathrm{sgn}\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 1\right )\right )} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2}}{a} - \frac{2 \,{\left (15 \, \sqrt{2} A a \mathrm{sgn}\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 1\right ) - 23 \, \sqrt{2} B a \mathrm{sgn}\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 1\right )\right )}}{a}\right )} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + \frac{27 \,{\left (\sqrt{2} A a \mathrm{sgn}\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 1\right ) - \sqrt{2} B a \mathrm{sgn}\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 1\right )\right )}}{a}\right )} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )}{{\left (a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - a\right )} \sqrt{-a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + a}} - \frac{3 \,{\left (7 \, \sqrt{2} A - 11 \, \sqrt{2} B\right )} \log \left ({\left | -\sqrt{-a} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + \sqrt{-a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + a} \right |}\right )}{\sqrt{-a} a \mathrm{sgn}\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 1\right )}}{12 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]